package special_tree;

import code.TargetCode;

import compiler.CompilerException;

import lexer.Token;
import tree.ClassScope;
import tree.IdentifierScope;
import tree.MethodScope;
import tree.MyTree;
import tree.NamingException;
import tree.Tree;
import tree.Type;

public class ClassDeclTree extends MyTree {

	private int numberOfInstVar = 0;
	
	public ClassDeclTree(Token token, int numberOfInstVar, Type[] extendsArr,
			Type[] implementsArr, Tree... operands) {
		super(token, operands);
		this.numberOfInstVar = numberOfInstVar;
	}

	/* (non-Javadoc)
	 * @see tree.MyTree#preAnalyzeNames(tree.IdentifierScope, tree.MethodScope, tree.ClassScope)
	 */
	@Override
	@Deprecated
	public void preAnalyzeNames(IdentifierScope identScope,
			MethodScope methodScope, ClassScope classScope)
			throws NamingException {
		classScope.declare(this);
		super.preAnalyzeNames(identScope, methodScope, classScope);
	}

	/* (non-Javadoc)
	 * @see tree.MyTree#getNumberOfInstVar()
	 */
	@Override
	@Deprecated
	public int getNumberOfInstVar() {
		return this.numberOfInstVar;
	}

	/* (non-Javadoc)
	 * @see tree.MyTree#generateProgramCode(code.TargetCode)
	 */
	@Override
	@Deprecated
	public void generateProgramCode(TargetCode targetCode)
			throws CompilerException {
		
	}

}
